package com.ss.android.newmedia.d;

import android.content.Context;

import com.bytedance.article.b.DexDependAdapter;
import com.bytedance.common.utility.Logger;
import com.ss.android.common.util.NetworkUtils;
import com.ss.android.newmedia.BaseAppData;
import com.ss.android.newmedia.NewMediaConstants;

import java.io.IOException;

public final class DexDependAdapterImpl implements DexDependAdapter {
    private static DexDependAdapterImpl a = new DexDependAdapterImpl();

    private DexDependAdapterImpl() {

    }

    public static void loadDexDependAdapter(Context context, String arg6) throws Throwable {
        try {
            Object v2 = android.support.design.a.a(Class.forName("com.ss.android.dex.party.DexDependManager"), "inst", new Object[0]);
            if ((v2 instanceof DexDependAdapter)) {
                ((DexDependAdapter) v2).setAdapter(DexDependAdapterImpl.a);
                ((DexDependAdapter) v2).initWeiboSdk(context, arg6);
                return;
            }
            throw new IOException("classes3dex load fail!!!");
        } catch (Throwable throwable) {
            Logger.w("DexParty", "load DexDependAdapter exception: " + throwable);
            throw throwable;
        }
    }

    public final boolean canUseWeiBoSso() {
        boolean v0 = false;
        String v2 = BaseAppData.inst().appContext.getChannel();
        String[] v3 = NewMediaConstants.MODEL_CANNOT_USE_WEIBO_SSO;
        int v1 = 0;
        while (true) {
            if (v1 >= 2) {
                return true;
            } else if (!v3[v1].equalsIgnoreCase(v2)) {
                ++v1;
                continue;
            }
            return v0;
        }
    }

    public final int getWeiBoSSOReqCode() {
        return 32973;
    }

    public final void initWeiboSdk(Context arg1, String arg2) {
    }

    public final boolean isNetworkAvailable(Context arg2) {
        return NetworkUtils.isNetworkAvailable(arg2);
    }

    public final void loggerD(String arg1, String arg2) {
        Logger.d(arg1, arg2);
    }

    public final boolean loggerDebug() {
        return Logger.debug();
    }

    public final void monitorSoLoad(String arg1, boolean arg2) {
    }

    public final void setAdapter(DexDependAdapter arg1) {
    }
}

